package org.mx.dal.entity;

import org.mx.dal.annotation.ElasticField;

import com.fasterxml.jackson.annotation.JsonIgnore;

import co.elastic.clients.elasticsearch._types.mapping.Property.Kind;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 描述： 带有地理定位点的实体定义
 *
 * @author john peng
 * Date time 2018/8/20 下午2:25
 */
@ToString(callSuper = true)
@Getter
@Setter
public class ElasticGeoPointBaseEntity extends ElasticBaseEntity {
    /**
	 * 
	 */
	private static final long serialVersionUID = -134069566590898246L;

	/**
	 * 标定的GeoPoint
	 */
	@ElasticField(type = Kind.GeoPoint)
    private GeoPoint location;

	/**
	 * 计算的距离，单位为米
	 */
	@JsonIgnore
    private double distance;
}
